package com.kun.lagou.commodity.api;

import com.kun.lagou.commodity.api.dto.CommodityInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 商品服务对外接口
 * @author Administrator
 */
@FeignClient(value = "commodity-service", contextId = "commodity-service")
public interface CommodityApi {
    /**
     * 根据商品ID查询商品信息
     * @param id
     * @return
     */
    @GetMapping("/commodity/commodities/{id}")
    CommodityInfo getById(@PathVariable("id") long id);
}
